package com.pushtime.service.dto;

import java.time.Instant;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.Objects;

/**
 * A DTO for the HdfsLog entity.
 */
public class HdfsLogDTO implements Serializable {

    private Long id;

    @Size(max = 20)
    private String name;

    @Size(max = 512)
    private String src;

    @Size(max = 512)
    private String dst;

    private Long totalSize;

    private Long currentSize;

    private Double process;

    private Integer state;

    @Size(max = 512)
    private String desc;

    private Instant createdDate;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSrc() {
        return src;
    }

    public void setSrc(String src) {
        this.src = src;
    }

    public String getDst() {
        return dst;
    }

    public void setDst(String dst) {
        this.dst = dst;
    }

    public Long getTotalSize() {
        return totalSize;
    }

    public void setTotalSize(Long totalSize) {
        this.totalSize = totalSize;
    }

    public Long getCurrentSize() {
        return currentSize;
    }

    public void setCurrentSize(Long currentSize) {
        this.currentSize = currentSize;
    }

    public Double getProcess() {
        return process;
    }

    public void setProcess(Double process) {
        this.process = process;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public Instant getCreatedDate() {
        return createdDate;
    }

    public void setCreatedDate(Instant createdDate) {
        this.createdDate = createdDate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        HdfsLogDTO hdfsLogDTO = (HdfsLogDTO) o;
        if (hdfsLogDTO.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), hdfsLogDTO.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "HdfsLogDTO{" +
            "id=" + getId() +
            ", name='" + getName() + "'" +
            ", src='" + getSrc() + "'" +
            ", dst='" + getDst() + "'" +
            ", totalSize=" + getTotalSize() +
            ", currentSize=" + getCurrentSize() +
            ", process=" + getProcess() +
            ", state=" + getState() +
            ", desc='" + getDesc() + "'" +
            ", createdDate='" + getCreatedDate() + "'" +
            "}";
    }
}
